-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PropTypes from production build (#209) #3818
Conversation
Hmm. I feel like that ESLint rule is too restrictive. It should be perfectly okay to use another component's Button.propTypes = {
...Touchable.propTypes,
color: PropTypes.string
} The message is also not friendly:
It should say something like
Can you follow up with |
* Remove PropTypes from production build (facebook#209) * Added react/forbid-foreign-prop-types rule to eslint config * Removed react/forbid-foreign-prop-types rule from eslint config
I'm too late on this thread. but what about the scenario that @gaearon mentioned about:
? |
I made a PR to |
@iansu - thanks for the quick reply. Why about this case:
|
I'm not sure why you'd be getting the warning in that case. This would need to be addressed in |
Apply
babel-plugin-transform-react-remove-prop-types
when building for production.Closes #209